<script type="text/javascript">
	Yutil.useLoadingMessage();
	Yutil.en.enhance();
</script>

<%
	String contractid = (String) request.getParameter("contractid");
	System.out.println("contractid------" +  contractid);
 %>

<fieldset>
	<legend>创建企业</legend>
	<form id="enterprise_form" action="enterpriseCreate.do">
		<table align="left" width="477" height="312" class="form">
			<tr>
				<th><font color="white">企业名称</font></th>
				<td>
					<input style="width:100%" type="text" id="enterprise_name" name="enterprise_name" class="required"/>
				</td>
			</tr>
			<tr>
				<th><font color="white">企业代表编号</font></th>
				<td>
					<input style="width:100%" type="text" id="representative_id" name="representative_id" class="number"/>
				</td>
			</tr>
			<tr>
				<th><font color="white">企业代表</font></th>
				<td>
					<input style="width:100%" type="text" id="representative" name="representative"/>
				</td>
			</tr>
			<tr>
				<th><font color="white">企业创建日期</font></th>
				<td>
					<input style="width:70%" type="text" id="createdate" name="createdate" class="date"/>
				</td>
			</tr>
			<tr>
				<th><font color="white">企业代表电话</font></th>
				<td>
					<input style="width:100%" type="text" id="representative_phone" name="representative_phone" class="number"/>
				</td>
			</tr>
				<tr>
				<th><font color="white">联系电话</font></th>
				<td>
					<input style="width:100%" type="text" id="phone" name="phone" class="number"/>
				</td>
			</tr>
				<tr>
				<th><font color="white">注册资金</font></th>
				<td>
					<input style="width:100%" type="text" id="capital" name="capital" class="number"/>
				</td>
			</tr>
				<tr>
				<th><font color="white">所属类别</font></th>
				<td>
					<select style="width:100%" id="category" name="category">
					<option value="1" selected="true">国企</option>
					<option value="2">民营</option>
					<option value="3">中外合资</option>
					<option value="4">外商独资</option>
					<option value="5">外商代表处</option>
					<option value="6">其他</option>
				</td>
			</tr>
				<tr>
				<th><font color="white">所属行业</font></th>
				<td>
					<select style="width:100%"  id="industry" name="industry">
					<option value="02" selected="true">电子</option>
					<option value="01">计算机</option>
					<option value="03">通讯（信）</option>
					<option value="04">机械</option>
					<option value="05">自动化</option>
					<option value="06">能源</option>
					<option value="07">钢铁/冶金</option>
					<option value="08">建筑</option>
					<option value="09">化工</option>
					<option value="10">制药</option>
					<option value="11">生物</option>
					<option value="12">交通运输</option>
					<option value="13">纺织/服装</option>
					<option value="14">轻工/造纸/印刷</option>
					<option value="15">仪器仪表</option>
					<option value="16">采矿</option>
					<option value="17">食品</option>
					<option value="18">消费品</option>
					<option value="19">农林牧渔</option>
					<option value="20">银行/金融</option>
					<option value="21">房地产</option>
					<option value="22">商业</option>
					<option value="23">环保</option>
					<option value="24">公共健康与卫生</option>
					<option value="25">教育/文化艺术</option>
					<option value="26">物流</option>
					<option value="27">酒店/旅游</option>
					<option value="28">咨询/服务</option>
					<option value="32">医疗器械/耗材</option>
					<option value="30">其它</option>
					<option value="31">零售业</option>
					<option value="33">有色金属</option>
				</td>
			</tr>
			<tr>
				<th><font color="white">企业描述</font></th>
				<td>
					<input style="width:100%" type="text" id="description" name="description"/>
				</td>
			</tr>
			<tr>
				<th><font color="white">部门代码</font></th>
				<td>
					<input style="width:100%" type="text" id="orgdeptcode" name="orgdeptcode" class="number"/>
				</td>
			</tr>
			<tr>	
				<td>
					<input class='button' type="button" value="添加" onclick="addEnterprise(this);">
					<input class='button' type="reset" value="重设">
					<input class='button' type="button" value="取消">
				</td>
			</tr>
		</table>
	</form>
</fieldset>

<div id="add_Result">
</div>
<script type="text/javascript">
	addEnterprise = function(btn) {
		var enterprise_form = document.getElementById('enterprise_form');
		//must add the '/' 
		var url = "/" + "<%= LocalContants.PROJECT_NAME %>" + "/enterpriseCreate.do";
		var pars = Form.serialize(enterprise_form);
		if(Yform.validateAllOnSubmit(btn)) { 
			var myAjax = new Ajax.Updater('right',url,{method:'post',parameters: pars,evalScripts:true});
		}
	}
</script>



<%@ page import="java.util.*" %>
<%@ page import="com.esms.bean.Contract" %>
<%@ page import="com.esms.struts.service.*" %>
<%@ page language="java" contentType="text/html; charset=utf-8" %>